import random
coins = xrange(100)
print coins
for i in coins:
    print i

flips = 10000
coins = xrange(100)
heads = sc.parallelize(coins,200).map(lambda x :random.random()).filter(lambda x: x < 0.51)
heads.count()